import Api from "../apis/Apis";
import Tools from "../../utils/tools";
import Http from "../../utils/http";

const list = (queryParams) => {
    const queryString = Tools.paramsToQueryString(queryParams);
    return Http.get(Api.CompanyUser.list+ queryString);
}

const bind = (data) => {
    return Http.post(Api.CompanyUser.bind,data);
}

const mine = (queryParams) => {
    const queryString = Tools.paramsToQueryString(queryParams);
    return Http.get(Api.CompanyUser.mine+ queryString);

}

const studentDetail = (id) => {
    return Http.get(Api.CompanyUser.studentDetail+ id);
}

const getUserSheetDetail = (id,type) => {
    return Http.get(Api.CompanyUser.GetUserSheetDetail+ id + '/'+ type);
}

const CompanyUserService = {
    list,
    bind,
    mine,
    studentDetail,
    getUserSheetDetail
}

export default CompanyUserService;